<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/heard.jsp"%>      
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>学无止境-个人博客</title>
<meta name="keywords" content="个人博客" />
<meta name="description" content="" />
<link rel="stylesheet" href="${basePath }css/index.css"/>
<link rel="stylesheet" href="${basePath }css/style.css"/>
<script type="text/javascript" src="${basePath }js/jquery.min.js"></script>
<script type="text/javascript" src="${basePath }js/jquery.SuperSlide.2.1.1.js"></script>
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<![endif]-->
	<script type="text/javascript">
	$(function(){
		$.ajax({
			url:"${basePath}article/newArticle.shtml",
			type:"post",
			dataType:"json",
			success:function(date){
				if(date.msg== "成功"){
					
					var html="";
					$.each(date.list,function(index,article){
						
						html=html+"<li><a href='${basePath }article/toArticle.shtml?id="+article.id+"'"+"title='"+article.title+"'>"+article.title+"</a></li>";
						
					});
					$("#newArticle").html(html);
					
		        }else{
		        	alert("左侧文章加载失败");
		        }
			},
			error:function(){
				alert("左侧文章加载失败")
			}
		})
	})
	
	
	</script>

</head>

<body>
      <!--header start-->
    <div id="header">
      <h1>个人博客</h1>
      <p>青春是打开了,就合不上的书。人生是踏上了，就回不了头的路，爱情是扔出了，就收不回的赌注。</p>    
    </div>
     <!--header end-->
    <!--nav-->
     <div id="nav">
         <ul>
         <li><a href="${basePath }login/indexUI.shtml?pageNo=0">首页</a></li>
         <li><a href="${basePath }about/aboutUI.shtml">关于我</a></li>
         <li><a href="${basePath }shuo/shuoUI.shtml?pageNo=0">碎言碎语</a></li>
         
         <li><a href="${basePath }learn/learnUI.shtml">学无止境</a></li>
         
         <div class="clear"></div>
        </ul>
      </div>
       <!--nav end-->
    <!--content start-->
    <div id="content">
       <!--left-->
         <div class="left" id="learn">
           <div class="weizi">
           <div class="wz_text">当前位置：<a href="#">首页</a>><h1>学无止境</h1></div>
           </div>
           <div class="l_content">
              <!--wz-->
           <c:forEach items="${page.itmes }" var="article">
           <div class="wz">
            <h3><a href="${basePath }article/toArticle.shtml?id='${article.id }'" title="${article.title }">${article.title }</a></h3>
             <dl>
               <dt><img src="${basePath }upload/${article.imageUrl }" width="200"  height="123" alt=""></dt>
               <dd>
                 <p class="dd_text_1">${article.content }</p>
               <p class="dd_text_2">
               <span class="left author">${article.create }</span><span class="left sj">时间:<fmt:formatDate
											value="${article.modifyTime }" pattern="yyyy-MM" /></span>
               <span class="left fl">分类: <c:forEach var="type"
											items="${articletype }">
											<c:if test="${type.key ==article.type }">${type.value }</c:if>
										</c:forEach></span><span class="left yd"><a href="${basePath }article/toArticle.shtml?id='${article.id }'" title="阅读全文">阅读全文</a>
               </span>
                <div class="clear"></div>
               </p>
               </dd>
               <div class="clear"></div>
             </dl>
            </div>
           <!--wz end-->
           </c:forEach>
           <!--wz end-->
     		<c:if test="${page.pageNo !=0 }">
					<a href="${basePath }learn/learnUI.shtml?pageNo=${page.pageNo-1}">
						上一页 </a>
				</c:if>
				当前页:${page.pageNo+1}

				<c:if test="${page.pageNo+1 <page.total }">
					<a href="${basePath }learn/learnUI.shtml?pageNo=${page.pageNo+1}">
						下一页 </a>

				</c:if>
           </div>
         </div>
         <!--end left -->
         <!--right-->
         <jsp:include page="/common/left.jsp"></jsp:include>
         <!--end  right-->
         <div class="clear"></div>
         
    </div>
    <!--content end-->
    <!--footer-->
    <div id="footer">
     <p>Design by:邹经 2017-05-16</p>
    </div>
    <!--footer end-->
    <script type="text/javascript">jQuery(".lanmubox").slide({easing:"easeOutBounce",delayTime:400});</script>
    <script  type="text/javascript" src="${basePath }js/nav.js"></script>
</body>
</html>